home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Devices and Hardware / SCSI / SCSI Async Sample / Src / SCSIBusInquiry.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  704 b   |  33 lines  |  [TEXT/KAHL]

  1. /*                                SCSIBusInquiry.c                                */
  2. /*
  3.  * SCSIBusInquiry.c
  4.  * Copyright © 1992-93 Apple Computer Inc. All Rights Reserved.
  5.  *
  6.  * Get information on a specified host bus adaptor (HBA) incluing the number
  7.  * of HBA's installed.
  8.  *
  9.  * This function will crash if the New SCSI Manager is not installed.
  10.  *
  11.  */
  12. #include "SCSIAsyncSample.h"
  13.  
  14. OSErr
  15. GetHostBusCount(
  16.         short                        *busCount
  17.     )
  18. {
  19.  
  20.         OSErr                        status;
  21.         SCSIBusInquiryPB            busInquiryPB;
  22. #define PB                            (busInquiryPB)
  23.  
  24.         CLEAR(PB);
  25.         PB.scsiPBLength = sizeof PB;
  26.         PB.scsiFunctionCode = SCSIBusInquiry;
  27.         PB.scsiDevice.bus = 0;
  28.         status = SCSIAction((SCSI_PB *) &PB);
  29.         if (status == noErr)
  30.             *busCount = PB.scsiHiBusID;
  31.         return (status);
  32. }        
  33.